<template>
    <view>
        <view class="list-item" v-for="(item, index) in list" :key="index">
            <view @click="editData(item)">
                <view><span class="font_black9">跟进记录：</span><span class="">{{item.txt || '--'}}</span> </view>
                <view><span class="font_black9">跟进类别：</span><span class=""> {{item.uid_cp_name || ''}} {{item.cid_title || '--'}}</span> </view>
                <view><span class="font_black9">跟进时间：</span><span class="">{{item.atime_str || '--'}}</span> </view>
            </view>
            <div class="switchDiv">
                <span>是否开放给客户：</span><el-switch v-model="item.is2c" active-value="1" inactive-value="2" ></el-switch>
            </div>
            <div class="imgBox">
                <el-image
                    v-for="(row,i) in item.imgs" :key="i" 
                    style="width: 50px; height: 50px; margin-right: 10px;"
                    :src="row" 
                    :preview-src-list="[row]">
                </el-image>
            </div>
        </view>
    </view>
</template>

<script>
export default {
    props: ["list"],
    data () {
        return {}
    },
    methods: {
        editData (row) {
            this.$emit('editData',row)
        }
    }
}
</script>

<style lang="scss" scoped>
.list-item {
    padding: 15px 0;
    border-bottom: 1px solid #EEEEEE;
    cursor: pointer;
    // display: flex;
    .switchDiv {
        padding: 10px 0;
        pointer-events: none; 
    }
    .imgBox {
        height: 100%;
        margin-right: 20px;
        img {
            width: 50px;
        }
    }
    .bg_gray{
        display: inline-block;
        padding: 2px 6px;
        border-radius: 4px;
        background-color: rgb(247, 243, 238) !important;
    }
}
</style>    